<%@ page contentType="charset=UTF-8" language="java" %><%--
--%><%@ page import="spacecrack.Player" %><%--
--%><%@ page import="spacecrack.PlayerManager" %><%--
--%><%@ page import="spacecrack.NameRandomizer" %><%--
--%><%@ page import="java.util.List" %><%--
--%><%@ page import="com.google.appengine.api.users.User" %><%--
--%><%@ page import="com.google.appengine.api.users.UserService" %><%--
--%><%@ page import="com.google.appengine.api.users.UserServiceFactory" %><%--
--%><%@ page import="o.json.JSONFactory" %><%--
--%><%@ page import="o.json.JSONWriter" %><%--
--%><html><body><%

	final String thisURL = request.getRequestURI();
	final UserService us = UserServiceFactory.getUserService();

	if (us.isUserLoggedIn()) {

		final User user = us.getCurrentUser();

%><%= user %> <%
%><a href="<%= us.createLogoutURL(thisURL) %>">x</a><%

	} else {

		response.sendRedirect(us.createLoginURL(thisURL));
%><%= us.createLoginURL(thisURL) %><%

	}

%></body></html>